Skip to content

refunds#2615

Merged
chelojimenez merged 1 commit into
mainfrom
refundzz
Jun 13, 2026
Merged

refunds#2615
chelojimenez merged 1 commit into
mainfrom
refundzz

Conversation

@ignaciojimenezr

@ignaciojimenezr ignaciojimenezr commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

516

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@chelojimenez

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The pull request extends the payment history feature with additional refund and credit states. The data contract now includes three new statuses (credited, refunded_and_credited, pending_refund) and adds a required details field plus optional accountCreditedCents to payment entries. Normalization logic populates details from raw input with a fallback default. The component displays details as a new column/row field, formats negative amounts with leading minus signs, and renders expanded badge variants for the new states. Tests verify correct normalization and rendering behavior for seat refunds and combined refund-plus-credit scenarios.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
mcpjam-inspector/client/src/components/billing/__tests__/PaymentsHistorySection.test.tsx (1)

27-44: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

makeEntry omits accountCreditedCents, so split-refund fixtures are incomplete.

The helper accepts overrides containing accountCreditedCents but never forwards that field into the returned PaymentHistoryEntry, so the new split refund+credit scenario is not fully represented.

Suggested patch
 function makeEntry(
   overrides: Partial<PaymentHistoryEntry> & { id: string }
 ): PaymentHistoryEntry {
   return {
@@
     ...(overrides.reversedPaidCents !== undefined
       ? { reversedPaidCents: overrides.reversedPaidCents }
       : {}),
+    ...(overrides.accountCreditedCents !== undefined
+      ? { accountCreditedCents: overrides.accountCreditedCents }
+      : {}),
     ...(overrides.receiptUrl !== undefined
       ? { receiptUrl: overrides.receiptUrl }
       : {}),
   };
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@mcpjam-inspector/client/src/components/billing/__tests__/PaymentsHistorySection.test.tsx`
around lines 27 - 44, The makeEntry factory is not including the
accountCreditedCents field from overrides, so split-refund fixtures are
incomplete; update the makeEntry function to forward
overrides.accountCreditedCents into the returned PaymentHistoryEntry (similar to
how reversedPaidCents and receiptUrl are conditionally spread) so the produced
entries can represent split refunds and credits correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@mcpjam-inspector/client/src/components/billing/__tests__/PaymentsHistorySection.test.tsx`:
- Around line 27-44: The makeEntry factory is not including the
accountCreditedCents field from overrides, so split-refund fixtures are
incomplete; update the makeEntry function to forward
overrides.accountCreditedCents into the returned PaymentHistoryEntry (similar to
how reversedPaidCents and receiptUrl are conditionally spread) so the produced
entries can represent split refunds and credits correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f0983b5f-67ce-46ad-82cb-cc12b7622ec1

📥 Commits

Reviewing files that changed from the base of the PR and between 5e99d3b and 25c58de.

📒 Files selected for processing (4)
  • mcpjam-inspector/client/src/components/billing/PaymentsHistorySection.tsx
  • mcpjam-inspector/client/src/components/billing/__tests__/PaymentsHistorySection.test.tsx
  • mcpjam-inspector/client/src/hooks/__tests__/usePaymentsHistory.test.ts
  • mcpjam-inspector/client/src/hooks/usePaymentsHistory.ts

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Internal preview

Preview URL: https://mcp-inspector-pr-2615.up.railway.app
Deployed commit: 972faa2
PR head commit: 25c58de
Backend target: staging fallback.
Health: ✅ Convex reachable
Access is employee-only in non-production environments.

@ignaciojimenezr ignaciojimenezr changed the title refuns refunds Jun 12, 2026
@chelojimenez
chelojimenez merged commit aff1f91 into main Jun 13, 2026
12 checks passed
@chelojimenez
chelojimenez deleted the refundzz branch June 13, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants